#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int lines(FILE *file)
{
		int i=0;
		char ch;
		do
		{
				ch=fgetc(file);
				if(ch=='\n')
						i++;
		}while(ch!=EOF);
		fclose(file);
		printf("%d\n",i);
		return i;
}

int main(int argc,char *argv[])
{
		FILE *fl=fopen(argv[2],"r");
		int len= lines(fl);
		int j=0;
		int l=atoi(argv[1]);
		char c;
		fl=fopen(argv[2],"r");
		while(j<len-l)
		{
				c=fgetc(fl);
				if(c=='\n') j++;
		}
		do
		{
				c=fgetc(fl);
				putchar(c);
		}while(c!=EOF);

		fclose(fl);
		return 0;

}
